// EG4ActionInit.hh -- brief definition of the class
// Created: Jan. 26, 2019, transcribed by Asia SUN, asia.rabbit@163.com
// Last modified: Jan. 26, 2019, by Asia SUN

#ifndef EG4ActionInit_h
#define EG4ActionInit_h

#include "G4VUserActionInitialization.hh"

class EG4ROOT;
class EG4PGAction;

class EG4ActionInit : public G4VUserActionInitialization{
public:
  EG4ActionInit(EG4ROOT *r);
  virtual ~EG4ActionInit();

  virtual void BuildForMaster() const override;
  virtual void Build() const override;

  void SetUsingGun(bool opt = true){ fUsingGun = opt; }
  virtual void SetTargetZ(double z){ fTargetZ = z; }

protected:
  EG4ROOT *fROOT;

  bool fUsingGun;
  double fTargetZ;
};

#endif
